package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.starlink.model.domain.SchoolbagGroupBagDO;
import com.starlink.model.request.SchoolbagBookCheckRequest;
import com.starlink.model.request.SchoolbagGroupBagListOperationRequest;
import com.starlink.model.request.SchoolbagGroupBagRequest;
import com.starlink.model.vo.SchoolbagGroupBagListOperationVO;
import com.starlink.model.vo.SchoolbagGroupBagVO;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author zhanghong
 */
public interface SchoolbagGroupBagService extends IService<SchoolbagGroupBagDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    SchoolbagGroupBagVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<SchoolbagGroupBagVO> pageQuery(Pageable pageable,SchoolbagGroupBagRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<SchoolbagGroupBagVO> listQuery(SchoolbagGroupBagRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(SchoolbagGroupBagRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(SchoolbagGroupBagRequest request);
    /**
     * 根据主键删除
     * @param ids
     * @return
     */
    Boolean deleteDOByIds(String ids);

    Boolean batchAdd(SchoolbagGroupBagListOperationRequest request);

    Boolean batchUpdate(SchoolbagGroupBagListOperationRequest request);

    /**
     * 规格分期
     * @param groupId
     * @return
     */
    SchoolbagGroupBagListOperationVO getBagListByGroupId(long groupId);

    /**
     * 书包书籍校验
     * @param request
     * @return
     */
    Boolean check(SchoolbagBookCheckRequest request);
}
